package com.ruoyi.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.SensitiveMapper;
import com.ruoyi.web.domain.Sensitive;
import com.ruoyi.web.service.ISensitiveService;

/**
 * 敏感词Service业务层处理
 *
 * @author jiwei
 * @date 2024-05-17
 */
@Service
public class SensitiveServiceImpl extends ServiceImpl<SensitiveMapper, Sensitive> implements ISensitiveService {
    @Autowired
    private SensitiveMapper sensitiveMapper;

    /**
     * 查询敏感词
     *
     * @param id 敏感词主键
     * @return 敏感词
     */
    @Override
    public Sensitive selectSensitiveById(Long id) {
        return sensitiveMapper.selectSensitiveById(id);
    }

    /**
     * 查询敏感词列表
     *
     * @param sensitive 敏感词
     * @return 敏感词
     */
    @Override
    public List<Sensitive> selectSensitiveList(Sensitive sensitive) {
        return sensitiveMapper.selectSensitiveList(sensitive);
    }

    /**
     * 新增敏感词
     *
     * @param sensitive 敏感词
     * @return 结果
     */
    @Override
    public int insertSensitive(Sensitive sensitive) {
            return sensitiveMapper.insertSensitive(sensitive);
    }

    /**
     * 修改敏感词
     *
     * @param sensitive 敏感词
     * @return 结果
     */
    @Override
    public int updateSensitive(Sensitive sensitive) {
        return sensitiveMapper.updateSensitive(sensitive);
    }

    /**
     * 批量删除敏感词
     *
     * @param ids 需要删除的敏感词主键
     * @return 结果
     */
    @Override
    public int deleteSensitiveByIds(Long[] ids) {
        return sensitiveMapper.deleteSensitiveByIds(ids);
    }

    /**
     * 删除敏感词信息
     *
     * @param id 敏感词主键
     * @return 结果
     */
    @Override
    public int deleteSensitiveById(Long id) {
        return sensitiveMapper.deleteSensitiveById(id);
    }
}
